<template>
</template>

<script>
export default {
  data() {
    return {
      tr: false,
      url: "",
      taskDeviceId: "",
      tf: false,
      back: false
    };
  },
  onLoad(val) {
    // plus.screen.lockOrientation('portrait-primary');
    // console.log('dsdsdsdsdsdsdsd')
    this.tr = val.tr;
    this.url = val.url;
    this.taskDeviceId = val.taskDeviceId;
    this.tf = val.tf;
    this.back = val.back;
    this.tableheader = val.tableheader;
    this.header = val.header;
    this.header = val.header;
    this.dataType = val.dataType;
    this.phone = val.phone;
    this.manufacturer = val.manufacturer;
    // console.log(this.tableheader)
    if (val.tr == undefined) {
      uni.navigateBack();
      uni.navigateBack();
    } else if (val.tr) {
      uni.showLoading({
        title: "加载中"
      });
      // console.log(this.url)
      // console.log(this.taskDeviceId)
      // console.log(this.phone)
      // uni.navigateBack();
      // uni.navigateBack();
      setTimeout(() => {
        uni.navigateTo({
          url:
            this.url +
            "&taskDeviceId=" +
            this.taskDeviceId +
            "&tf=" +
            this.tf +
            "&back=" +
            true +
            "&tableheader=" +
            this.tableheader +
            "&header=" +
            this.header +
            "&dataType=" +
            this.dataType +
            "&phone=" +
            this.phone +
            "&manufacturer=" +
            this.manufacturer
        });
      }, 2000);
    }
    if (this.back) {
      // console.log('fffffffffffffffffffffffff')
      uni.navigateBack();
    }
  }
};
</script>
